
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 横坐标周期 1：小时 2：天 3：月
 * </p>
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum PeriodTypeEnum {

    HOUR("1", "小时"),
    DAY("2", "天"),
    MONTH("3", "月");
    private final String value;
    private final String description;

    public static PeriodTypeEnum find(String val) {
        for (PeriodTypeEnum dataScopeEnum : PeriodTypeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
